<template>
  <div class="setting-contain">
    <van-cell-group>
      <van-cell title="修改密码" is-link @click.native="$router.push('/repassword')" />
      <van-cell title="提交反馈" is-link />
      <van-cell title="版本" value="v1.0.2" />
    </van-cell-group>
    <div class="btn">
      <van-button type="danger" @click="quit">退出登录</van-button>
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    quit() {
      this.$store.commit("setToken", "");
      this.$store.commit("setRefreshToken", "");
      this.$store.commit("setUserInfo", {});
      this.$store.commit("setShopCarList", []);
      this.$router.replace("/login");
    },
  },
};
</script>

<style lang="scss" scoped>
.setting-contain {
  .btn {
    position: fixed;
    bottom: 0;
    width: 100%;

    .van-button {
      width: 100%;
    }
  }
}
</style>
